// API 基础配置
export const API_BASE_URL = '/api/v1'

// 用户认证相关接口
export const AuthAPI = {
  login: `${API_BASE_URL}/auth/login`,
  register: `${API_BASE_URL}/auth/register`,
  logout: `${API_BASE_URL}/auth/logout`,
  refreshToken: `${API_BASE_URL}/auth/refresh-token`,
  profile: `${API_BASE_URL}/auth/profile`,
}

// 用户管理相关接口
export const UserAPI = {
  list: `${API_BASE_URL}/users`,
  create: `${API_BASE_URL}/users`,
  update: (id: string) => `${API_BASE_URL}/users/${id}`,
  delete: (id: string) => `${API_BASE_URL}/users/${id}`,
  syncUsers: `${API_BASE_URL}/users/sync`,
}

// 冥币管理相关接口
export const CurrencyAPI = {
  stats: `${API_BASE_URL}/currency/stats`,
  transactions: `${API_BASE_URL}/currency/transactions`,
  mint: `${API_BASE_URL}/currency/mint`,
  transfer: `${API_BASE_URL}/currency/transfer`,
  burn: `${API_BASE_URL}/currency/burn`,
  exchangeRates: `${API_BASE_URL}/currency/exchange-rates`,
}

// 轮回管理相关接口
export const ReincarnationAPI = {
  souls: `${API_BASE_URL}/reincarnation/souls`,
  records: `${API_BASE_URL}/reincarnation/records`,
  realms: `${API_BASE_URL}/reincarnation/realms`,
  create: `${API_BASE_URL}/reincarnation/souls`,
  update: (id: string) => `${API_BASE_URL}/reincarnation/souls/${id}`,
  reincarnate: (id: string) => `${API_BASE_URL}/reincarnation/souls/${id}/reincarnate`,
}

// 阎王殿审判记录相关接口
export const JudgmentAPI = {
  list: `${API_BASE_URL}/judgments`,
  create: `${API_BASE_URL}/judgments`,
  update: (id: string) => `${API_BASE_URL}/judgments/${id}`,
  delete: (id: string) => `${API_BASE_URL}/judgments/${id}`,
  stats: `${API_BASE_URL}/judgments/stats`,
}

// 日志管理相关接口
export const LogAPI = {
  list: `${API_BASE_URL}/logs`,
  create: `${API_BASE_URL}/logs`,
  delete: (id: string) => `${API_BASE_URL}/logs/${id}`,
  clear: `${API_BASE_URL}/logs/clear`,
  export: `${API_BASE_URL}/logs/export`,
}

// 系统管理相关接口
export const SystemAPI = {
  // 角色管理
  roles: {
    list: `${API_BASE_URL}/system/roles`,
    create: `${API_BASE_URL}/system/roles`,
    update: (id: string) => `${API_BASE_URL}/system/roles/${id}`,
    delete: (id: string) => `${API_BASE_URL}/system/roles/${id}`,
  },
  // 权限管理
  permissions: {
    list: `${API_BASE_URL}/system/permissions`,
    update: `${API_BASE_URL}/system/permissions`,
  },
  // 系统配置
  settings: {
    get: `${API_BASE_URL}/system/settings`,
    update: `${API_BASE_URL}/system/settings`,
  },
}
